<%-- 
    Document   : create
    Created on : 13.09.2010, 15:44:29
    Author     : nico
--%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="u" uri="http://nixis.de/jsp/tags/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<html>
    <head>
        <title>${it.update ? 'Edit' : 'Create a'} article / task</title>
    </head>
    <body>
        <h1>${it.update ? 'Edit' : 'Create a'} article / task</h1>
        <form method="post" action="<u:url value="/article" />">
            <fieldset>
                <label for="article-title">Title</label>
                <input type="text" name="title" id="article-title" value="${it.title}"/>
            </fieldset>
            <fieldset>
                <label for="article-content">Content</label>
                <textarea id="article-content" cols="80" rows="20" name="content">${it.content}</textarea>
                <div>
                    <small>
                        You can use <a href="http://daringfireball.net/projects/markdown/" target="_blank">Markdown</a>
                        to write the articles.
                        <a href="http://daringfireball.net/projects/markdown/syntax">Learn about its syntax here.</a>
                    </small>
                </div>
            </fieldset>
            <fieldset>
                <label for="article-topics">Topics</label>
                <input type="text" name="topics" id="article-topics" value="${it.topics}"/> <small>(separate using comma)</small>
            </fieldset>
            <fieldset>
                <c:if test="${it.update}">
                    <input type="hidden" name="id" value="${it.id}" />
                </c:if>
                <input type="submit" value="submit"/>
            </fieldset>
        </form>
    </body>
</html>
